package com.taobao.wolfwolf.hibernate.pojo;

/**
 * RibbonColorId entity. @author MyEclipse Persistence Tools
 */

public class RibbonColorId implements java.io.Serializable {

	// Fields

	private Ribbon ribbon;
	private Color color;

	// Constructors

	/** default constructor */
	public RibbonColorId() {
	}

	/** full constructor */
	public RibbonColorId(Ribbon ribbon, Color color) {
		this.ribbon = ribbon;
		this.color = color;
	}

	// Property accessors

	public Ribbon getRibbon() {
		return this.ribbon;
	}

	public void setRibbon(Ribbon ribbon) {
		this.ribbon = ribbon;
	}

	public Color getColor() {
		return this.color;
	}

	public void setColor(Color color) {
		this.color = color;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof RibbonColorId))
			return false;
		RibbonColorId castOther = (RibbonColorId) other;

		return ((this.getRibbon() == castOther.getRibbon()) || (this
				.getRibbon() != null && castOther.getRibbon() != null && this
				.getRibbon().equals(castOther.getRibbon())))
				&& ((this.getColor() == castOther.getColor()) || (this
						.getColor() != null && castOther.getColor() != null && this
						.getColor().equals(castOther.getColor())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getRibbon() == null ? 0 : this.getRibbon().hashCode());
		result = 37 * result
				+ (getColor() == null ? 0 : this.getColor().hashCode());
		return result;
	}

}